package com.frame.work.common.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * 在静态方法中获取YML文件中的变量信息
 *
 * @author: logan.zou
 * @date: 2018-08-16 11:20
 */
@Component
public class YmlStatic {

    private static String generalQueueProcessing;

    @Value("${topic.rabbit.generalQueueProcessing}")
    private String generalQueueProcessingValue;

    @PostConstruct
    public void getApiToken() {
        generalQueueProcessing = this.generalQueueProcessingValue;
    }

    public static String getGeneralQueueProcessing() {
        // lockie.zou
        return generalQueueProcessing;
    }
}